// index.js
// 获取应用实例
const app = getApp()

Page({
  data: {
nav:['推荐','排行','歌手','支付'],
self:0
  },
  onLoad(){
    
      this.selectComponent('#soncomponent').showQuit();
  
  },
  btntab(e){
  let {index}= e.currentTarget.dataset;
  this.setData({
    self:e.target.dataset.index
  })
  switch (index) {
    case 0:
      this.selectComponent('#soncomponent').showQuit();
      break;
      case 1:
        break;
        case 2:
          this.selectComponent('#sonsinger').showsinger();
          break;

    default:
      break;
  }
  },
  gotouser(){
wx.navigateTo({
  url: '/pages/user/index',
})
  }
})
